﻿/**
 * 重做、撤销
 */
(function(E){
var Consts = E.consts,
	Event = E.mod("Event"),
	History=E.mod("History");

E.plugin("Redo,Undo", {
	click: function( Panel, self, target ){
		var name = self.name;
			
		if (History){
			History[name]( );
		}else{
			E.execCommand(name);
		}
		
		return 1;
	}
});

Event.bind("oncreate", function(){
	var Undo = E.plugin('Undo'),
		Redo = E.plugin('Redo');
	
	Undo.disable();
	Redo.disable();
});

})(jQEditor);